<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Ajax请求</title>
	</head>
	<body>
		<button id="load">加载更多</button>
		<div id="photos"></div>
		<script src="../External%20js/jquery.min.js"></script>
		<script>
		$(() => {
			$('#load').on('click',(evt) => {
				const url = 'http://api.tianapi.com/meinv/index?key=1032f66a7a384b95ee84b304bbe9f4d6&num=10&page='
				var page = 0
				$('#load').on('click',(evt) => {
					page += 1
					$.getJSON(url+page,(json) => {
						json.newslist.forEach((mm) => {
							$('#photos').prepend($('<img>').attr('src',mm.picUrl).attr('width',300))
						})
					})
				})
			})
		})
		</script>
	</body>
</html>
